home *** CD-ROM | disk | FTP | other *** search
- Turbo Debugger Log
-
- In D2 the startup code in the EXE file explicitly calls the init-sections
- of units with explicit init/final code:
-
- inittest.InitTest: begin
- :0041F4EC 55 push ebp
- :0041F4ED 8BEC mov ebp,esp
- :0041F4EF 83C4F4 add esp,FFFFFFF4
- :0041F4F2 E8753CFEFF call @InitExe
- :0041F4F7 E8904FFEFF call System
- :0041F4FC E83779FEFF call SysUtils
- :0041F501 E8C6E4FEFF call Classes
- :0041F506 E8ADE5FEFF call Printers
- :0041F50B E80805FFFF call Menus
- :0041F510 E82367FFFF call Controls
- :0041F515 E88EFFFFFF call Forms
- :0041F51A E8ADFFFFFF call TestInit
- inittest.10: Application.Initialize;
- :0041F51F A128164200 mov eax,[00421628]
- :0041F524 E877F6FFFF call TApplication.Initializ
-
- In D2 the init code starts with a call to AddExitProc if the unit contains
- a finalization section. Otherwise on magic code is added.
-
- TestInit: initialization
- :0041F4CC B8B0054200 mov eax,004205B0
- :0041F4D1 E8D246FEFF call @AddExitProc
- testinit.19: AutoGlobalP := pointer(longint(@UnitGlob
- :0041F4D6 B860164200 mov eax,00421660
- :0041F4DB 83C004 add eax,00000004
- :0041F4DE A35C164200 mov [0042165C],eax
- testinit.20: UnitGlobal := 0;
- :0041F4E3 33C0 xor eax,eax
- :0041F4E5 A360164200 mov [00421660],eax
- testinit.22: finalization
- :0041F4EA C3 ret
-
- No magic code is added to the final section in D2:
-
- testinit.finalization: AutoGlobalP := pointer(longint
- :0041F4B4 B860164200 mov eax,00421660
- :0041F4B9 83C004 add eax,00000004
- :0041F4BC A35C164200 mov [0042165C],eax
- testinit.28: UnitGlobal := 0;
- :0041F4C1 33C0 xor eax,eax
- :0041F4C3 A360164200 mov [00421660],eax
- testinit.31: end.
- :0041F4C8 C3 ret
-
-